<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "request".
 *
 * @property int $id
 * @property string $module module id
 * @property string $url pathinfo url
 * @property string $ip ipv4
 * @property string|null $created_at
 */
class Request extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'request';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['ip'], 'required'],
            [['created_at'], 'safe'],
            [['module', 'ip'], 'string', 'max' => 20],
            [['url'], 'string', 'max' => 100],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'module' => 'Module',
            'url' => 'Url',
            'ip' => 'Ip',
            'created_at' => 'Created At',
        ];
    }
}
